<?
//inculde即可以使用data数据。本页所有的data数据，倾在controller都处理好
include_once("../../../common/modules/checkA.php");
include_once("../../../../config.php");
?>





<?php
$_REQUEST['ai_date']       = date(Y . '-' . m . '-' . d . ' ' . H . '-' . i . '-' . s);
$_REQUEST['ai_authur']     = $_SESSION['username'];
$_REQUEST['ai_ip']         = $_SERVER["REMOTE_ADDR"];
$_REQUEST['ai_member_nid'] = $_REQUEST["member_nid"];
$_REQUEST['ai_cost']       = $_REQUEST["cost"];
$_REQUEST['ai_type']       = $_REQUEST["type"];
$_REQUEST['ai_amount']     = $_REQUEST["amount"];
$_REQUEST['ai_vip_limite']     = $_REQUEST["vip_limite"];




if($_REQUEST['vip_limite'])
{
    $_member_new['ai_vip_end_time']=$_REQUEST["vip_limite"];
    $_renew_limite=update_date($table_prefix."member",$_member_new,"nid",$_REQUEST['ai_member_nid']);
    $query = do_query($_renew_limite) or die (mysqli_error().$_renew_limite);
    mysqli_close($con);

    $arr['info'] = "更新vip时间";

}





if($_REQUEST['ai_amount'])
{
$sql   = insert_date($table_prefix."sms_charge_record",$_REQUEST);
$query = do_query($sql) or die (mysqli_error().$sql);
mysqli_close($con);

    if($query)
    {
        $status = 200;
    }
    else
    {
        $status = 204;
    }
}





$arr['status'] = $status;
$arr['info'] = $sql;
die(json_encode($arr));

?>





